package wangyihang.test;

import org.xm.Similarity;
import org.xm.tendency.word.HownetWordTendency;

public class test {
    public static void main(String[] args) {

        testSimilarity();
//        double result = Similarity.cilinSimilarity("电动车", "自行车");
//        System.out.println(result);
//
//        String word = "美好";
//        HownetWordTendency   = new HownetWordTendency();
//        result = hownetWordTendency.getTendency(word);
//        System.out.println(word + "  词语情感趋势值：" + result);
    }

    public static void testSimilarity () {
        String a = "算帐";
        String b = "算账";
        System.out.println("辞林相似度：" + Similarity.cilinSimilarity(a, b));
        System.out.println("拼音相似度：" + Similarity.pinyinSimilarity(a, b));
        System.out.println("字面相似度：" + Similarity.charBasedSimilarity(a, b));
        System.out.println("语义概念相似度：" + Similarity.conceptSimilarity(a, b));
    }
}
